package com.dingreading.cloud.admin.service;

import com.alibaba.fastjson.JSONObject;
import com.dingreading.cloud.admin.dto.GoodsGivesDto;
import com.dingreading.cloud.admin.entity.GoodsGives;
import com.dingreading.cloud.common.util.PageDto;
import com.dingreading.cloud.common.util.PageUtil;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface GoodsGivesService extends IService<GoodsGives> {

    PageDto<GoodsGivesDto> goodsPageList(PageUtil pageUtil, String keyword, Integer enabled);

    PageDto<JSONObject> couponPageList(PageUtil pageUtil, String keyword, Integer enabled);

    GoodsGives getById(Long id);

    int dropBean(Long id);

    boolean haveByProductId(Integer type, Long productId);

    boolean haveGoodsId(Long goodsId);

    boolean updateEnabled(Long id, String staffUid, String staffName, Integer enabled);

    List<GoodsGives> getByProductIdsAndType(List<Long> ids, Integer type);

}
